﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace SelfMadeMillionaire.Web.Infrastructure.ViewModels.ContactUs
{
	public class ContactUsViewModel
	{
		[DisplayName("First Name")]
		[StringLength(100)]
		public string FirstName { get; set; }

		[DisplayName("Last Name")]
		[StringLength(100)]
		public string LastName { get; set; }

		[Required]
		[StringLength(50)]
		[RegularExpression(Constants.EMAIL_REGX, ErrorMessage = "Please enter a valid email address")]
		public string Email { get; set; }

		[StringLength(20)]
		public string Phone { get; set; }

		public string Captcha { get; set; }

		[Required]
		[StringLength(4000)]
		public string Comments { get; set; }

		public string SendStatusMessage { get; set; }

        public SelectList Departments 
        {
            get
            {
                List<SelectListItem> list = new List<SelectListItem>();
                list.Add(new SelectListItem { Text = "Advertising", Value = "1" });
                list.Add(new SelectListItem { Text = "Customer Support", Value = "2" });
                list.Add(new SelectListItem { Text = "Sales", Value = "3" });
                list.Add(new SelectListItem { Text = "Technical support", Value = "4" });
                list.Add(new SelectListItem { Text = "Billing", Value = "5" });
                return new SelectList(list, "Value", "Text");
            }
        }

        [DisplayName("Department")]
        public int Department { get; set; }

        public ContactUsViewModel()
        {
            Department = 1;
        }
	}
}
